﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class car
    {
        private string _brand;
        private string _type;
        public string brand { get => this._brand; set => this._brand = value; }
        public string type { get => this._type; set => this._type = value; }

        public car() { 
        
        }
        public car(string brand,string type) {
            this.brand = brand;
            this.type = type;
        }
        public void run() {
            Console.WriteLine("这辆车的品牌是{0},型号是{1}，能动能跑",this._brand,this._type);
        }

    }
    interface Ifire {
        void Fire();
    }
    interface Ifly {
        void fly();
    }

    class Batman : car, Ifly {
        public Batman(string brand,string type):base(brand,type) { 
        
        }
        public void fly() {
            Console.WriteLine("{0}，型号是{1}的车还能飞行", base.brand, this.type);
        }
    }
    class BMWCar : car, Ifire
    {
        public BMWCar(string brand, string type) : base(brand, type)
        {

        }

        public void Fire()
        {
           
        }

        public void fly()
        {
            
        }
    }
}
